<template>
  <lymenu-list :list="menuListData"></lymenu-list >
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import { useRoute, useRouter } from 'vue-router';
  import lymenuList from '../lengyucomponents/lymenuList.vue';

 
  const router = useRouter();
  const route = useRoute();

  console.log(router.getRoutes()); // 输出所有路由配置

  const menuListData =  [
  {
        path: '/home',
        name: 'home',
        component:"../views/Home/HomeView.vue",
        meta: { title: '首页' ,parentName:"",icon:"home-filled" },
    },
  {
      path: '/setting',
      name: 'setting',
      component:"../views/Home/HomeView.vue",
      meta: { title: '设置',icon:"tools" },
      children:[
      
          {
              path: '/tenant',
              name: 'tenant',
              component:"../views/SysManage/Tenant‌/Tenant‌View.vue",
              meta: { title: '租户管理',parentName:"setting",icon:"tools" },
          },
          {
              path: '/menu',
              name: 'menu',
              component:"../views/SysManage/Menu/MenuView.vue",
              meta: { title: '菜单管理',parentName:"setting" },
          },
          {
              path: '/permissions',
              name: 'permissions',
              component:"../views/SysManage/Permissions/PermissionsView.vue",
              meta: { title: '权限管理',parentName:"setting" },
          },
      ]
  },
  {
      path: '/echartsDemo',
      name: 'echartsDemo',
      component:"../views/Home/HomeView.vue",
      meta: { title: 'echartsDemo',icon:"tools" },
      children:[
      
         
          {
              path: '/echartsMdt3',
              name: 'echartsMdt3',
              component:"../views/wow/mdt/Demo.vue",
              meta: { title: 'echart地图3',parentName:"setting" },
          },
      ]
  },
   
  
]

  
  const handleOpen = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
  }
  const handleClose = (key: string, keyPath: string[]) => {
    console.log(key, keyPath)
  }
</script>